batman-adv: Merge bugfixes from 2025.1 1111/head
authorSven Eckelmann <[email protected]>
Mon, 21 Apr 2025 16:16:00 +0000 (18:16 +0200)
committerSven Eckelmann <[email protected]>
Mon, 21 Apr 2025 16:16:00 +0000 (18:16 +0200)
* Ignore own maximum aggregation size during RX

Signed-off-by: Sven Eckelmann <[email protected]>
batman-adv/Makefile
batman-adv/patches/0009-batman-adv-Ignore-own-maximum-aggregation-size-durin.patch [new file with mode: 0644]

index 70b9df1eef8a5348b96a3da16dcc3526cccc0f5a..0ad565eb3ffecb3d40ff56dc0f73d5c383e4aad4 100644 (file)
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
 PKG_VERSION:=2024.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
diff --git a/batman-adv/patches/0009-batman-adv-Ignore-own-maximum-aggregation-size-durin.patch b/batman-adv/patches/0009-batman-adv-Ignore-own-maximum-aggregation-size-durin.patch
new file mode 100644 (file)
index 0000000..f7861a7
--- /dev/null
@@ -0,0 +1,46 @@
+From: Sven Eckelmann <[email protected]>
+Date: Sun, 2 Feb 2025 17:04:13 +0100
+Subject: batman-adv: Ignore own maximum aggregation size during RX
+
+An OGMv1 and OGMv2 packet receive processing were not only limited by the
+number of bytes in the received packet but also by the nodes maximum
+aggregation packet size limit. But this limit is relevant for TX and not
+for RX. It must not be enforced by batadv_(i)v_ogm_aggr_packet to avoid
+loss of information in case of a different limit for sender and receiver.
+
+This has a minor side effect for B.A.T.M.A.N. IV because the
+batadv_iv_ogm_aggr_packet is also used for the preprocessing for the TX.
+But since the aggregation code itself will not allow more than
+BATADV_MAX_AGGREGATION_BYTES bytes, this check was never triggering (in
+this context) prior of removing it.
+
+Fixes: b780db96954a ("add packet aggregation add jitter for rebroadcast of packets if aggregation is disabled")
+Fixes: 667996ebeab4 ("batman-adv: OGMv2 - implement originators logic")
+Signed-off-by: Sven Eckelmann <[email protected]>
+Signed-off-by: Simon Wunderlich <[email protected]>
+Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/7e6b4d0619fe2754787078c23c16c6a7ddb126eb
+
+--- a/net/batman-adv/bat_iv_ogm.c
++++ b/net/batman-adv/bat_iv_ogm.c
+@@ -324,8 +324,7 @@ batadv_iv_ogm_aggr_packet(int buff_pos,
+       /* check if there is enough space for the optional TVLV */
+       next_buff_pos += ntohs(ogm_packet->tvlv_len);
+-      return (next_buff_pos <= packet_len) &&
+-             (next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES);
++      return next_buff_pos <= packet_len;
+ }
+ /* send a batman ogm to a given interface */
+--- a/net/batman-adv/bat_v_ogm.c
++++ b/net/batman-adv/bat_v_ogm.c
+@@ -839,8 +839,7 @@ batadv_v_ogm_aggr_packet(int buff_pos, i
+       /* check if there is enough space for the optional TVLV */
+       next_buff_pos += ntohs(ogm2_packet->tvlv_len);
+-      return (next_buff_pos <= packet_len) &&
+-             (next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES);
++      return next_buff_pos <= packet_len;
+ }
+ /**